// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#pragma once
#ifndef _BROWSER_PROCESS_APP_H_
#define _BROWSER_PROCESS_APP_H_

#include "include/cef_app.h"
#include "js_bridge/js_bridge.h"

// Implement application-level callbacks for the browser process.
class BrowserProcessApp : public CefApp, public CefBrowserProcessHandler{
 public:
  BrowserProcessApp();

  // CefApp methods:
  virtual void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) override;
  virtual void OnRegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) override;
  virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() override { return this; }

  // CefBrowserProcessHandler methods:
  virtual void OnContextInitialized() override;
  virtual CefRefPtr<CefClient> GetDefaultClient() override;


 private:
  // Include the default reference counting implementation.
  IMPLEMENT_REFCOUNTING(BrowserProcessApp);

private:
	std::vector<CefString>			cookieable_schemes_;
	bool							last_node_is_editable_{ false };
};


#endif  // _BROWSER_PROCESS_APP_H_
